//提示框
function salert(str){
    var msgw,msgh,bordercolor;
    msgw=200;

	if(!document.getElementById("bgDiv")){
		var bgObj = document.createElement("div");
		bgObj.setAttribute('id','bgDiv');
		bgObj.style.position="fixed";
		bgObj.style.top="30%";
		bgObj.style.background="#000";
		bgObj.style.opacity="0.7";
		bgObj.style.left="50%";
		bgObj.style.borderRadius="10px";
		bgObj.style.marginLeft=-msgw/2+"px";
		bgObj.style.width=msgw + "px";
		bgObj.style.padding="30px 6px";
		bgObj.style.zIndex="20001";
		document.body.appendChild(bgObj);
		var txt = document.createElement("p");
		txt.style.fontSize="15px";
		txt.style.color="#fff";
		txt.style.lineHeight="22px";
		txt.style.letterSpacing="1px";
		txt.style.textAlign="center";
		txt.setAttribute("id","msgTxt");
		txt.innerHTML = str;
		document.getElementById("bgDiv").appendChild(txt);
		var timer = null;
		timre = setTimeout(function(){document.body.removeChild(bgObj);},1500);
	}
}

//提示框2
function salert2(str){
	var msgh,bordercolor;

	if(!document.getElementById("bgDiv")){
		var bgObj = document.createElement("div");
		bgObj.setAttribute('id','bgDiv');
		bgObj.style.position="fixed";
		bgObj.style.top="30%";
		bgObj.style.background="#000";
		bgObj.style.opacity="0.7";
		bgObj.style.left="10%";
		bgObj.style.borderRadius="10px";
		bgObj.style.width="80%";
		bgObj.style.padding="30px 0";
		document.body.appendChild(bgObj);
		var txt = document.createElement("p");
		txt.style.fontSize="15px";
		txt.style.color="#fff";
		txt.style.lineHeight="22px";
		txt.style.letterSpacing="1px";
		txt.style.textAlign="center";
		txt.setAttribute("id","msgTxt");
		txt.innerHTML = '<a style="color:#fff;" href="tel:'+str+'">'+str+'</a>';
		document.getElementById("bgDiv").appendChild(txt);

		$('#bgDiv').append('<span id="clobtn" style="border:1px #fff solid;border-radius:6px;color:#fff;display:block;font-size: 15px;height:30px;line-height:30px;margin:15px auto 0;text-align:center;width:40%;">确定</span>');

		$('#clobtn').click(function(){document.body.removeChild(bgObj);});
	}
}

//联系我们点击
$('.clots').click(function(){
	salert2('4000527027');
});


